package com.lianxi;

import java.util.LinkedList;
import java.util.List;

public class LinkedListTest {
    public static void main(String[] args) {
//        List list=new LinkedList();  调用addFirst和addLast时有限制需向下转型
        LinkedList linkedlist = new LinkedList();
        linkedlist.add("aaa");
        linkedlist.add("bbb");
        linkedlist.add("ccc");

        linkedlist.addFirst("mmm");
        linkedlist.addLast("vvv");

        System.out.println(linkedlist);

    }

}
